package com.dog.basics.bean.dto.admin.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * <p>
 * 消息通知
 * </p>
 *
 * @author guonh
 * @since 2020-05-14
 */
@Data
public class NewsAddDto {


    /**
     * 消息接收人 : -1 全部接受
     */
    @ApiModelProperty(value = "消息接收人 : -1 全部接受", dataType = "Long", required = false)
    private Long userId;

    /**
     * 消息类型: 0-系统消息 1-问题整改消息
     */
    @NotNull(message = "消息类型不能为空")
    @ApiModelProperty(value = "消息类型", dataType = "Integer", required = true)
    @Min(value = 0, message = "承包模式只能是:(0-系统消息 1-问题整改消息)")
    @Max(value = 1, message = "承包模式只能是:(0-系统消息 1-问题整改消息)")
    private Integer newsType;

    /**
     * 消息标题
     */
    @NotBlank(message = "消息标题不能为空")
    @ApiModelProperty(value = "消息标题", dataType = "String", required = true)
    @Size(min = 1,max = 50,message = "消息标题不正确(1-50)")
    private String title;

    /**
     * 消息内容
     */
    @ApiModelProperty(value = "消息内容", dataType = "String", required = false)
    private String newsContent;




}
